<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>新增</title>
<style>
#topdiv{margin:0 auto;border:0px solid #000;width:600px;height:50px;line-height:40px;margin-top: 25px;}
#bottomdiv{margin:0 auto;border:0px solid #000;width:500px;height:50px;line-height:40px;margin-top: 25px;align:center} 

table{
	border-collapse: collapse;
	width:500px;
	text-align:center
}
th{
border: 1px solid #666666;
}
td{
border: 1px solid #666666;
}
.bottomsave{
position:relative;
top:10px;
width:80px;
background-color:#00BFFF;
}
.bottomcancel{
position:relative;
top:10px;
width:80px;
background-color:#00BFFF;
}
</style>
<script type="text/javascript">
	function Check()
    { 
        var playera= document.getElementById("playera").value;
        var playerb= document.getElementById("playerb").value;
        var playerc= document.getElementById("playerc").value;
        var score1= document.getElementById("score1").value;
        var score2= document.getElementById("score2").value;
        var score3= document.getElementById("score3").value;
        if(playera=="" || playera==null)
        {
            alert("[玩家A姓名]不能为空");
            return false;
        }else if(playerb=="" || playerb==null)
        {
            alert("[玩家B姓名]不能为空");
            return false;
        }else if(playerc=="" || playerc==null)
        {
            alert("[玩家C姓名]不能为空");
            return false;
        }else if(score1=="" || score1==null)
        {
            alert("[分值1]不能为空");
            return false;
        }else if(score2=="" || score2==null)
        {
            alert("[分值2]不能为空");
            return false;
        }else if(score3=="" || score3==null)
        {
            alert("[分值3]不能为空");
            return false;
        }
        
        if(score3>score2 && score2>score1){
        	
        }else{
        	alert("请注意分值的输入，分值3>分值2>分值1");
        	return false;
        }
    }
</script>
</head>
<body>
<div id="topdiv">
</div>
<form id="addform" action="../WebTest/AddServlet?AC=addSave" method="post">
<table border="1" align="center" valign="center">
<tr>
<td width="100px">
玩家A姓名
</td>
<td>
<input type="text" id="playera" name="playera" style="height:30px;width:400px;border:0px">
</td>
</tr>
<tr>
<td width="100px">
玩家B姓名
</td>
<td>
<input type="text" id="playerb" name="playerb" style="height:30px;width:400px;border:0px">
</td>
</tr>
<tr>
<td width="100px">
玩家C姓名
</td>
<td>
<input type="text" id="playerc" name="playerc" style="height:30px;width:400px;border:0px">
</td>
</tr>
<tr>
<td width="100px">
分值1
</td>
<td>
<input type="number" id="score1" name="score1" style="height:30px;width:400px;border:0px">
</td>
</tr>
<tr>
<td width="100px">
分值2
</td>
<td>
<input type="number" id="score2" name="score2" style="height:30px;width:400px;border:0px">
</td>
</tr>
<tr>
<td width="100px">
分值3
</td>
<td>
<input type="number" id="score3" name="score3" style="height:30px;width:400px;border:0px">
</td>
</tr>
</table>
<div id="bottomdiv">
<input class="bottomsave" type="submit" value="保存" onclick="return Check();">&nbsp;&nbsp;
<input class="bottomcancel" type="button" value="取消" onclick="javascript:history.back(-1);">
</div>
</form>
</body>
</html>